package net.sareweb.acab.session;

import net.sareweb.acab.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("seatList")
public class SeatList extends EntityQuery<Seat> {

	private static final String EJBQL = "select seat from Seat seat";

	private static final String[] RESTRICTIONS = { "lower(seat.state) like lower(concat(#{seatList.seat.state},'%'))", };

	private Seat seat = new Seat();

	public SeatList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Seat getSeat() {
		return seat;
	}
}
